<template>
  <div>
    <el-card class="box-card">
      <div >
        <span>住户详情</span>
      </div>
    </el-card>
    <el-card class="box-card" >
      <div slot="header" class="clearfix">
        <!-- <el-button
          style="float: right; margin-right: 92%; padding: 3px 0"
          type="text"
          @click="dialogFormVisible = true"
          >编辑</el-button
        > -->
        <span>基础资料</span>
      </div>
      <div >
        <el-descriptions class="margin-top" :column="3" :size="size">
          <el-descriptions-item label="住户姓名">{{pageinfo.users[0].userName}}</el-descriptions-item>
          <el-descriptions-item label="证件号码"
            >{{pageinfo.users[0].idCard}}</el-descriptions-item
          >
          <el-descriptions-item label="手机号码">{{pageinfo.users[0].phone}}</el-descriptions-item>
          <el-descriptions-item label="住户类型">
            <el-tag size="small">{{pageinfo.users[0].identity}}</el-tag>
          </el-descriptions-item>
          <el-descriptions-item label="住户来源"
            >{{pageinfo.users[0].residentSource}}</el-descriptions-item
          >
          <el-descriptions-item label="备注"
            >{{pageinfo.users[0].remark}}</el-descriptions-item
          >
        </el-descriptions>
      </div>
    </el-card>
  
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>审核</span>
      </div>
      <div>审核意见</div>
      <div style="margin: 20px 0"></div>
      <el-input
        class="e1"
        type="textarea"
        :autosize="{ minRows: 2, maxRows: 4 }"
        placeholder="请输入内容"
        v-model="textarea2"
      >
      </el-input>
      <br />
      <div style="margin: 20px 0"></div>
      <el-button type="primary" @click="tg()">审核通过</el-button>
      <el-button type="danger" @click="btg()">审核不通过</el-button>
      <el-button @click="fh()">返回</el-button>
    </el-card>
    
   
  </div>
</template>

<script>

export default {
  name: "Approval",
  data() {
    return {
      vehicleNumberId: this.$route.query.vehicleNumberId,
      pageinfo: "",
      dialogFormVisible: false,
      dialogFormVisible1: false,
      formLabelWidth: "120px",
      textarea2: "",
      forms:{
          middleId:"",
          state:"",
      }
    };
  },
  methods: {
   fh(){
          this.$router.push({
        path: "/resident",
      });
   },
     tg(){
    this.forms.middleId=this.$route.query.row.middleId;
    this.forms.state='审核通过';
    console.log(this.forms);
    this.$axios
        .post("/housingestate/cell/updatePc",this.forms )
        .then((res) => {
             this.$router.push({
           path:"/resident"
         })
        });
  },
  btg(){
    this.forms.middleId=this.$route.query.row.middleId;
    this.forms.state='审核不通过';
     this.$axios
        .post("/housingestate/cell/updatePc",this.forms )
        .then((res) => {
              this.$router.push({
           path:"/Resident"
         })
        });
  },
  },

  mounted() {
      this.pageinfo=this.$route.query.row;
  },
};
</script>

<style scoped>
.d1 {
  font-size: 25px;
}
.box-card {
  margin-top: 15px;
}
.c1 {
  margin-left: 20px;
}
.e1 {
  width: 30%;
}
</style>